<div class="doSearch">
  <h2>toDoList</h2>
  <input type="text" id="text" [(ngModel)]="history" (keyup)="search($event)">
  <hr>
  <ul>
    <li *ngFor="let item of historyList let key=index" [hidden]='item.code==1'><input type="checkbox" [(ngModel)]="item.code"> {{item.text}}-----   <button (click)="delete(key)">X</button></li>
  </ul>
  <hr>
  <ul>
      <li *ngFor="let item of historyList let key=index" [hidden]='item.code==0'><input type="checkbox" [(ngModel)]="item.code">{{item.text}}-----   <button (click)="delete(key)">X</button></li>
   </ul>
</div>